package com.baosight.risk.service.quartz.impl;

import com.baosight.risk.api.quartz.*;
import com.baosight.risk.base.mapper.BaseMapper;
import com.baosight.risk.base.service.BaseServiceImpl;
import com.baosight.risk.mapper.quartz.*;
import com.baosight.risk.service.quartz.entity.SysJobLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 定时任务调度日志信息 服务层
 *
 * @author duanyongqiang
 */
@Service
public class SysJobLogServiceImpl extends BaseServiceImpl<SysJobLog> implements ISysJobLogService {
    @Autowired
    private SysJobLogMapper jobLogMapper;


    @Override
    public BaseMapper getMapper() {
        return jobLogMapper;
    }


    @Override
    public List<SysJobLog> selectJobLog(String jobName) {
        return jobLogMapper.selectJobLog(jobName);
    }

    /**
     * 新增任务日志
     *
     * @param jobLog 调度日志信息
     */
    @Override
    public void addJobLog(SysJobLog jobLog) {
        jobLogMapper.insert(jobLog);
    }

}
